<template>
        <div>
        <v-row>
            <v-col cols="12" md="7">
                <v-ThirdTable
                    v-if="group_load"
                    :bar="group_unit"
                    :head="group_header"
                    :body="group_data"
                >
                </v-ThirdTable>
            </v-col>
        </v-row>
        </div>
</template>

<script>
import {defineComponent} from '@vue/composition-api'
import ThirdTable from './children/ThirdTable.vue'

export default defineComponent({
    setup() {

    },
    components: {
        'v-ThirdTable': ThirdTable
    },
    data(){
        return {
            group_load: false,
            group_unit: { class: 'green', title: '组用户信息展示', page: 12, height: '700px', function: 'group', icon: 'mdi-account-plus-outline' },
            group_header: [
                { text: '组名', value: 'group_id', align: 'start' },
                {
                    text: '姓名',
                    sortable: false,
                    value: 'cn_name',
                },
                { text: '域账号', value: 'user' },
                { text: '手机', value: 'phone' },
                { text: '邮箱', value: 'email' },
                { text: '操作', value: 'actions', sortable: false },
            ],
            group_data: [],
        }
    },
        mounted() {
        this.$emit("changeTaskID", 3)
        this.getGroupInfo()
    },
    methods: {
        getGroupInfo() {
            let get_data = {'username': localStorage.getItem('username')}
            this.$api.task.queryGroupInfo(get_data).then(res => {
                console.log('get_group_info ...')
                console.log(res)
                this.group_data = res.data.data
                this.group_load = true
            })
        },
    }

})
</script>

<style scoped>

</style>